// middlewares/auth.ts
import {NextRequest, NextResponse} from "next/server";

export function withAuth(request: NextRequest): NextResponse | null {
    console.log('[Auth Middleware] Checking auth for:', request.url)

    // if (!request.nextUrl.pathname.startsWith('/admin')) {
    //     console.log('[Auth Middleware] Not an admin route, skipping')
    //     return null
    // }

    // if (!request.cookies.has('auth-token')) {
    //     console.log('[Auth Middleware] No auth token, redirecting to login')
    //     return NextResponse.redirect('/login')
    // }

    console.log('[Auth Middleware] User authenticated')
    return null
}
